/**
 * @param {number[]} nums1
 * @param {number[]} nums2
 * @return {number}
 * @description 暴力
 */

var findMedianSortedArrays = function (nums1, nums2) {
    let arr = [...nums1, ...nums2]
    arr.sort((a, b) => {
        return a - b
    })
    console.log(arr)
    let len = arr.length
    if (len % 2 !== 0) {
        return arr[Math.floor(len / 2)]
    } else {
        let midIndex = len / 2
        return (arr[midIndex - 1] + arr[midIndex]) / 2
    }
};
console.log(findMedianSortedArrays([1, 3], [2]))